﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace Itasa.RSS
{
    public class RSS_Torrent
    {

        public enum Source { EZTV, ISOHUNT }

        internal String Name { get; private set; }
        internal String Url { get; private set; }

        internal RSS_Torrent(XmlNode sub_node, Source s)
        {
            foreach (XmlNode sd in sub_node.ChildNodes)
            {
                if (sd.InnerText != null)
                {
                    if (sd.Name == "title") Name = sd.InnerText;
                    if (sd.Name == "enclosure")
                    {
                        foreach (XmlAttribute sa in sd.Attributes)
                        {
                            if (sa.Name == "url") Url = sa.Value;
                        }
                    }
                }

            }
        }
       

    }
}
